home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Oberon⁄F™ 1.2 / Preinstalled version / Manuals / DocuConv / DocuConv (.txt)
Encoding:
Oberon Document  |  1996-07-08  |  10.1 KB  |  142 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. StdLogos.ViewDesc
  22. Helvetica
  23. Helvetica
  24. Helvetica
  25. StdFolds.FoldDesc
  26. Helvetica
  27. StdLinks.LinkDesc
  28. StdCmds.OpenBrowser('Manuals/Copyrigh', 'Copyright')
  29. Helvetica
  30. Oberon/F Release 1.2
  31. Copyright 
  32.  1994-1996 by Oberon microsystems, Inc.
  33. All rights reserved. No part of this publication may be reproduced in any form or by any means, without prior written permission by Oberon microsystems. The only exception is the free electronic distribution of the educational version of Oberon/F (see the accompanying 
  34. copyright
  35. notice
  36.  for details).
  37. Oberon/F module interfaces and their descriptions in particular may not be used in other works without written permission.
  38. Oberon microsystems, Inc.
  39. Technoparkstrasse 1
  40. CH-8005 Z
  41. Switzerland
  42. Oberon is a trademark of ETH Z
  43. rich, Switzerland.
  44. Oberon/F, Oberon/L, "Oberon by Example", "The Oberon Tribune", "Oberon Developer Forum", and "Drag & Pick" are trademarks of Oberon microsystems, Inc.
  45. All other trademarks and registered trademarks belong to their respective owners.
  46. Helvetica
  47. Helvetica
  48. Helvetica
  49.  Oberon/F
  50. Documentation Conventions
  51. Copyright Notice
  52. This section describes the format of the module interface descriptions, of which there is one per public module.
  53. Each section begins with a module definition. A pseudo Oberon notation is used, which lists all exported items of a module, and only those. It begins with the keyword DEFINITION instead of MODULE, export marks are omitted (except read-only marks), and procedure bodies and the module body are left out as well. A type-bound procedure appears in the corresponding record declaration itself.
  54. The hypothetical module "Dictionaries" serves as an example:
  55. DEFINITION Dictionaries;
  56.     CONST maxElems = 32;
  57.     TYPE
  58.         Dictionary = POINTER TO DictionaryDesc;
  59.         DictionaryDesc = RECORD
  60.             elems-: INTEGER;
  61.             PROCEDURE (d: Dictionary) Put (string: ARRAY OF CHAR; VAR key: INTEGER);
  62.             PROCEDURE (d: Dictionary) Get (key: INTEGER; VAR string: ARRAY OF CHAR)
  63.         END;
  64.     VAR someDict: Dictionary;
  65.     PROCEDURE Init;
  66. END Dictionaries.
  67. In an extended record, the inherited procedures are not listed, only the new procedures. The only exception is an inherited function procedure which has a different signature than the procedure it inherited from. This can be the case for a covariant function result, i.e. the procedure returns a pointer that is an extension of the one returned by the base procedure.
  68. A module definition is followed by a brief description of the abstraction(s) provided by the module.
  69. This module provides a concrete type Dictionary for the manipulation of string dictionaries.
  70. Then the constants of the module are listed, without their values:
  71. CONST maxElems
  72. Maximum number of elements in a dictionary.
  73. This is followed by the module's types. Record types are not described separately if a pointer type is available:
  74. TYPE Dictionary
  75. Interface
  76. Manages a dictionary of strings, with an integer number as key.
  77. Each type which serves as an interface type is marked as such, as above. An extension of a concrete type is never an interface type. Concrete types are not marked as such.
  78. If the type is an extension of another type, this is marked, e.g. as
  79. Interface, Extension
  80. Base types are not marked as such.
  81. Then the record fields are listed:
  82. elems-: INTEGER    0 <= elems <= maxElems
  83. The number of elements currently in the dictionary.
  84. As in the above example, an invariant over the record field's value may optionally be given.
  85. Then the procedures bound to this type are given:
  86. PROCEDURE (d: Dictionary) Put (string: ARRAY OF CHAR; VAR key: INTEGER)
  87. Interface
  88. For each type-bound procedure, it is specified whether this procedure is interface, empty, default, or concrete.
  89. An interface procedure may never be called.
  90. An empty procedure need never be called by an extending procedure (i.e. through a super-call of an overriding procedure).
  91. A default procedure may be replaced completely by an extending procedure. In this case, the extending procedure must implement the same behavior as the extended procedure. The Oberon/F documentation marks procedures as default procedures if they may be replaced by more efficient, but semantically equivalent implementations.
  92. Concrete procedures implement some behavior and must always be called by extending procedures. An extension of an empty, a default, or a concrete procedure is always marked the same way as its direct base procedure, or it is a concrete procedure. Concrete procedures are not marked as such.
  93. Every type which contains one or more interface procedures is an interface type.
  94. For each type-bound procedure, it is specified whether this procedure is an extended procedure, i.e. whether a corresponding procedure already exists for its base type.
  95. An explanation of the procedure's behavior follows:
  96. Put a string into dictionary d, and receive key in return. If the string is already in the dictionary, the same key is returned as when it was inserted first. If the string is not in the dictionary, it is inserted and a value which has not been used before is returned.
  97. After an explanation in plain English, some preconditions for this procedure may be specified. These preconditions are given in a semi-formal notation:
  98. string # ""    20
  99. This means that if the precondition is violated (i.e. if string = ""), the currently executing command is aborted with exception number 20. Instead of a number, the following exceptions may be specified as well:
  100.  invalid index
  101.  type guard check
  102. A second precondition may thus be the following:
  103. string in d  OR  d.elems < maxElems    invalid index
  104. After the preconditions, some postconditions may be specified:
  105. string in d'
  106.     old key returned
  107. ~(string in d')
  108.     string in d
  109.     d.elems = d.elems' + 1
  110.     new key returned
  111. This postcondition contains two cases, namely what happens if the string is already contained in d, and what happens if the string is not yet contained in d. The conditions are textually aligned to the left, while the respective conclusions are indented. Occasionally, conditions are nested by further indentations.
  112. To refer to values before the operation, an expression is followed by an apostrophe if this is necessary for clarity (i.e. if the value may be changed at all). Thus the expression
  113.     d.elems = d.elems' + 1
  114. means that the value of d.elems has been incremented by one.
  115. Oberon is generally used as syntax for such expressions, although some liberties are taken, e.g. simple auxiliary procedures (which may not be described further) may be used, or expressions like "r.Base().Length()" are used, which are not legal in Oberon.
  116. Function results are generically called "result".
  117. The amount of formalism is kept small. It is attempted to limit formal specifications to few and simple conditions, or to the explanation of particularly subtle situations. It is not intended to specify complete formal semantics of the library, thus the formalism does not replace plain text explanations, examples, or graphical illustrations completely.
  118. However, it is felt that checked preconditions in particular are often helpful even in this incomplete and semi-formal way, both for documentation and for debugging purposes.
  119. PROCEDURE (d: Dictionary) Get (key: INTEGER; VAR string: ARRAY OF CHAR)
  120. Interface
  121. Retrieve a string from the dictionary, by using key. If the value is not found, string is set to the empty string.
  122. key in d
  123.     return corresponding string
  124. ~(key in d)
  125.     return ""
  126. Procedures which are inherited through type extension are usually not listed here. Exceptions are procedures which have extended their semantics. Semantic extensions are restricted to having weaker preconditions or stronger postconditions.
  127. After all types, the global variables are listed:
  128. VAR someDict: Dictionary    someDict # NIL
  129. This variable contains a dictionary.
  130. The optional invariant is established by the module body.
  131. Finally, the procedures exported by the module are listed:
  132. PROCEDURE Init (d: Dictionary)
  133. Initializes a dictionary. Any dictionary may be allocated once only.
  134. d not yet initialized    20
  135. In Oberon/F, all procedures whose names start with "Init" may be called only once per object, i.e. they are "snappy".
  136. TextControllers.StdCtrlDesc
  137. TextControllers.ControllerDesc
  138. Containers.ControllerDesc
  139. Controllers.ControllerDesc
  140. Helvetica
  141. Documents.ControllerDesc
  142.